wayland: Don't broadcast selection owner changes
authorJonas Ådahl <jadahl@gmail.com>
Thu, 27 Aug 2015 06:59:45 +0000 (14:59 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 2 Sep 2015 03:28:27 +0000 (11:28 +0800)
commitd682aed55088a49e590b5e0e3fdb6ebb0d044d07
tree30c94bd871c9504ee0a034e49f9096baa628109f
parent9ad6ac0b4330b3d8fd3da101b594210464a9f942
wayland: Don't broadcast selection owner changes

When receiving a selection or when a drag icon enter a window, it was
targeted at a specific window. Lets emit the GDK_OWNER_CHANGE event
only for this window, instead of broadcasting.

Broadcasting has some nasty side effects. For example, if there was n
GdkWindows, and one would for every "owner-change" signal handler
receive n signals about the owner being changed.

An example of where this went a bit out of hand was gnome-terminal,
which added one listener per terminal window. This meant that if
one had m number of terminal windows, each time any one would loose or
gain keyboard focus, O(m^2) owner-change events would be emitted.

https://bugzilla.gnome.org/show_bug.cgi?id=754158
gdk/wayland/gdkdevice-wayland.c